package rain.sign;

import org.springframework.boot.autoconfigure.SpringBootApplication;
import rain.sign.common.MiHoYoConfig;
import rain.sign.service.impl.GenShinSignMiHoYo;
import rain.sign.service.impl.MiHoYoSignMiHoYo;
import rain.sign.util.GetstokenUtils;

import java.util.concurrent.Executors;
import java.util.concurrent.ThreadPoolExecutor;

/**
 * todo
 *
 * @author songZiHao
 * @version 1.0.0
 * @ClassName RainApplication.java
 * @createTime 2023年02月03日 14:39:00
 */
public class RainApplication {
	public static void main(String[] args) throws Exception {
		/********************米游社签到测试**********************/
		/*String miHaYoCookie = "_MHYUUID=09b9a5fd-57de-4c59-80a6-05865e2f5aaf; DEVICEFP_SEED_ID=98216b7606a5aa05; DEVICEFP_SEED_TIME=1675408099339; DEVICEFP=38d7ed22d2594; login_uid=77021275; login_ticket=74jGJmk6zaLYs2MNC8jRebgC5LosurFM82lyhP0z";
		String miYoPassId = "77021275";
		//根据米游社Cookie获取token
		String token = GetstokenUtils.doGen(miHaYoCookie);
		//        String token = "RAhvsueASxnSFa8cK6bn0OXP319LL9lHWwJr5wzS";
		ThreadPoolExecutor executor = (ThreadPoolExecutor) Executors.newCachedThreadPool();
		MiHoYoSignMiHoYo mihoyo = new MiHoYoSignMiHoYo(miHaYoCookie, MiHoYoConfig.HubsEnum.YS.getGame(), miYoPassId, token, executor);
		mihoyo.doSign();*/

		/********************原神签到测试**********************/
		String rainCookie = "UM_distinctid=185fc86e69f1df-0ec20df75403a8-16525635-280000-185fc86e6a0b82; _MHYUUID=ba966fbe-9ad7-41a1-8a1b-efa5f2dc6fda; _MHYUUID=ba966fbe-9ad7-41a1-8a1b-efa5f2dc6fda; DEVICEFP_SEED_ID=fcd70a9c24de1b34; DEVICEFP_SEED_TIME=1674978978911; _ga=GA1.1.1080863850.1674978979; DEVICEFP=38d7ed0c664d4; CNZZDATA1275023096=2091911548-1674977843-https%253A%252F%252Fwww.baidu.com%252F%7C1675409052; LOGIN_PLATFORM_SWITCH_STATUS={%22bll8iq97cem8%22:{%22sms_login_tab%22:true%2C%22pwd_login_tab%22:true%2C%22password_reset_entry%22:true%2C%22qr_login%22:false}}; account_mid_v2=0ywqb4f3tt_mhy; account_id_v2=77021275; ltmid_v2=0ywqb4f3tt_mhy; ltuid_v2=77021275; _ga_KS4J8TXSHQ=GS1.1.1675408371.2.1.1675410289.0.0.0";
		String rainUid = "113897886";
		GenShinSignMiHoYo gs = new GenShinSignMiHoYo(rainCookie,rainUid);
		gs.sign();
	}
}
